package com.example.service.commodity;

import com.example.pojo.commodity.Product;
import com.example.pojo.commodity.ProductType;

import java.util.List;

/**
 * @author LinJie
 * @create 2020-12-11 10:06
 */
public interface ProductService {
    //显示所有商品
    List<Product> queryAll();

    //根据商品名称查询
    Product queryByName(String name);

    //根据商品类别查询
    List<Product> queryByClass(String prdClass);

    //根据商品编号查询
    Product queryByID(String id);

    //模糊查询
    List<Product> queryBySomething(String proId, String proName, String proClass);

    //修改商品在架量和已售量和盈亏情况
    int updateOne(String proId, int product_sold, int product_online, double product_profit);

    //修改商品报废量和库存量和盈亏情况
    int updateScrap(String proId, int product_scrap, int product_stock, double product_profit);

    //新增一件商品
    int addOne(Product product);

    //更新一整条商品信息
    int updateWhole(Product product);

    //排序函数
    List<Product> orderByProfitUp();

    List<Product> orderByProfitDown();

    List<Product> orderByScrapUp();

    List<Product> orderByScrapDown();

    List<Product> orderBySoldUp();

    List<Product> orderBySoldDown();

    //统计表的类别查询
    List<ProductType> queryAllClass();
}
